package api

import (
	"slgw_web/serial/util"

	"openzbox.com/frame/echo"
	"openzbox.com/frame/echo/response"
)

// 获取日志信息
func GetErrorLog(c echo.Context) error {

	return response.SuccessResult(util.ErrorLogList, c)

}

// 清空日志信息
func DeleteErrorLog(c echo.Context) error {

	util.ErrorLogList = nil
	return response.SuccessResultWithEmptyData(c)

}

// 获取日志信息
func GetRTULog(c echo.Context) error {

	return response.SuccessResult(util.ModbusRTULogList, c)

}

// 清空日志信息
func DeleteRTULog(c echo.Context) error {

	util.ModbusRTULogList = nil
	return response.SuccessResultWithEmptyData(c)

}
